<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>

<%@ taglib uri="http://java.sun.com/jsp/jstl/core"  prefix="c" %>
 <jsp:include page="../header.jsp"></jsp:include>

	<table class="layui-table" lay-even lay-size="lg">
	<caption>员工列表</caption>
	<thead>
	   <tr>  
	       <th>Id</th>
	       <th>姓名</th>
	       <th>电话</th>
	       <th>部门</th>
	       <th>领导</th>
	       <th>工资</th>
	       <th>操作</th>
	   
	   
	   </tr>
	</thead>
	<tbody>
	<c:forEach items="${staffs}" var="staff">
	    <tr>
	      <td>${staff.id }</td>
	      <td>${staff.name }</td>
	      <td>${staff.phone }</td>
	      <td>${staff.dept_name }</td>
	      <td>${staff.leader_name}</td>
	      <td>${staff.salary }</td>
	      <td>
	       <a 	class="layui-btn layui-btn-radius layui-btn-danger layui-btn-sm"  href="javascript: if(window.confirm('是否删除？')){window.location.href='staff/remove?id=${staff.id}'}" >删除</a>
	      <a class="layui-btn layui-btn-radius layui-btn-normal layui-btn-sm" href="staff/editById?id=${staff.id }">编辑</a>
	      </td>
	    </tr>
	    </c:forEach>
	</tbody>
</table>
 <jsp:include page="../footer.jsp"></jsp:include>
